<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org"  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
<!-- Vendor styles -->
  <meta charset="UTF-8">
<link href="/css/bootstrap.min.css" data-th-href="@{/css/bootstrap.min.css}" rel="stylesheet">
<link href="/css/materialdesignicons.min.css" data-th-href="@{/css/materialdesignicons.min.css}" rel="stylesheet">
<link href="/js/bootstrap-table/bootstrap-table.min.css" data-th-href="@{/js/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
<link href="/css/style.min.css" data-th-href="@{/css/style.min.css}" rel="stylesheet">
<!-- fontIconPicker core CSS -->
<link rel="stylesheet" href="/js/fontIconPicker/css/jquery.fonticonpicker.min.css" type="text/css" data-th-href="@{/js/fontIconPicker/css/jquery.fonticonpicker.min.css}" />

<!-- required default theme -->
<link rel="stylesheet" type="text/css" href="/js/fontIconPicker/themes/dark-grey-theme/jquery.fonticonpicker.darkgrey.min.css" data-th-href="@{/js/fontIconPicker/themes/dark-grey-theme/jquery.fonticonpicker.darkgrey.min.css}" />
<!--对话框-->
<link rel="stylesheet" href="/js/jconfirm/jquery-confirm.min.css" data-th-href="@{/js/jconfirm/jquery-confirm.min.css}">
<script type="text/javascript" src="/js/jquery.min.js" data-th-src="@{/js/jquery.min.js}"></script>
<script type="text/javascript" src="/js/bootstrap.min.js" data-th-src="@{/js/bootstrap.min.js}"></script>
<!-- fontIconPicker JS -->
<script type="text/javascript"  src="/js/fontIconPicker/jquery.fonticonpicker.min.js" data-th-src="@{/js/fontIconPicker/jquery.fonticonpicker.min.js}"></script>
<script src="/js/jQuery-File-Upload/js/vendor/jquery.ui.widget.js" data-th-src="@{/js/jQuery-File-Upload/js/vendor/jquery.ui.widget.js}"></script>
<script src="/js/jQuery-File-Upload/js/jquery.iframe-transport.js" data-th-src="@{/js/jQuery-File-Upload/js/jquery.iframe-transport.js}"></script>
<script src="/js/jQuery-File-Upload/js/jquery.fileupload.js" data-th-src="@{/js/jQuery-File-Upload/js/jquery.fileupload.js}"></script>
<script src="/js/jQuery-File-Upload/js/jquery.fileupload-process.js" data-th-src="@{/js/jQuery-File-Upload/js/jquery.fileupload-process.js}"></script>
<script src="/js/jQuery-File-Upload/js/jquery.fileupload-ui.js" data-th-src="@{/js/jQuery-File-Upload/js/jquery.fileupload-ui.js}"></script>
</head>
<body>
<div class="container-fluid p-t-15">
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          <div id="toolbar" class="toolbar-btn-action">
            <button id="btn_add" type="button" class="btn btn-primary m-r-5" sec:authorize="hasAuthority('banner:add')" data-toggle="modal" data-target="#banner-add" data-whatever="@mdo">
              <span class="mdi mdi-plus" aria-hidden="true"></span>新增
            </button>
            <button id="btn_edit" type="button" class="btn btn-success m-r-5" onclick="updateBanner()" sec:authorize="hasAuthority('banner:update')">
              <span class="mdi mdi-check" aria-hidden="true"></span>修改
            </button>
            <button id="btn_delete" type="button" class="btn btn-danger" onclick="deleteBanners()" sec:authorize="hasAuthority('banner:delete')">
              <span class="mdi mdi-window-close" aria-hidden="true"></span>删除
            </button>
          </div>
          <table id="bannerTable"></table>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="modal fade" id="banner-add" data-keyboard="false" data-backdrop="static" tabindex="-1">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h3 class="modal-title pull-left" id="banner-add-modal-title">新增违规</h3>
      </div>
      <div class="modal-body">
        <form id="banner-add-form" class="needs-validation" novalidate>
          <div class="form-group">
            <label  for="title">标题:</label>
            <input type="text" name="title" class="form-control">
            <input type="hidden" name="id" >
          </div>
          <div class="form-group">
            <label for="openUrl">链接:</label>
            <input type="text" name="openUrl" class="form-control">
          </div>
          <div class="form-group">
            <label for="imgPath">图片</label>
            <div class="col-md-7 row">
              <div class="col-md-9">
                <input type="text" class="form-control" id="imgPath" name="imgPath" />
              </div>
              <div class="col-md-3">
                <a href="javascript:;" class="a-upload" id="uploadBanner">
                  <input type="file" name="bannerFile" id="banner_file">上传图片
                </a>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label  for="openTarget">打开方式:</label>
            <select  name="openTarget" class="form-control">
              <option value="_self">当前窗口</option>
              <option value="_blank">新打开</option>
            </select>
          </div>
          <div class="form-group">
            <label for="status">状态:</label>
            <label class="radio-inline" for="status-radio1">
              <input type="radio" id="status-radio1" name="status" value="1" checked>
              可用
            </label>
            <label class="radio-inline" for="status-radio2">
              <input type="radio" id="status-radio2" name="status" value="0">
              禁用
            </label>
          </div>
          <div class="form-group">
            <label for="seqNum">序号:</label>
            <input class="form-control" type="text" id="seqNum" name="seqNum"  placeholder="请输入序号" >
          </div>
          <div class="form-group">
            <label  for="description">描述:</label>
            <textarea class="form-control" name="description" rows="4"></textarea>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary btn-save" id="banner-add-button" name="save">保存</button>
        <button type="button" class="btn btn-default btn-close">关闭</button>
        <button class="btn-hide d-none"></button>
      </div>
    </div>
  </div>
</div>
<script inline="javascript">
	var ctx = [[@{/}]];
</script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js" data-th-src="@{/js/perfect-scrollbar.min.js}"></script>
<!--消息提示-->
<script src="/js/bootstrap-notify.min.js" data-th-src="@{/js/bootstrap-notify.min.js}"></script>
<!--对话框-->
<script src="/js/jconfirm/jquery-confirm.min.js" data-th-src="@{/js/jconfirm/jquery-confirm.min.js}"></script>
<script src="/js/lightyear.js" type="text/javascript" data-th-src="@{/js/lightyear.js}"></script>
<script src="/js/main.min.js" type="text/javascript" data-th-src="@{/js/main.min.js}"></script>
<script src="/js/bootstrap-table/bootstrap-table.min.js" type="text/javascript" data-th-src="@{/js/bootstrap-table/bootstrap-table.min.js}"></script>
<script src="/js/bootstrap-table/locale/bootstrap-table-zh-CN.js" type="text/javascript" data-th-src="@{/js/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>
<script src="/js/lightyear.js" type="text/javascript" data-th-src="@{/js/lightyear.js}"></script>
<script src="/js/common.js" type="text/javascript" data-th-src="@{/js/common.js}"></script>
<script src="/js/app/admin/cms/banner/banner.js" data-th-src="@{/js/app/admin/cms/banner/banner.js}"></script>
<script src="/js/app/admin/cms/banner/bannerAdd.js" data-th-src="@{/js/app/admin/cms/banner/bannerAdd.js}"></script>
<script src="/js/app/admin/cms/banner/bannerEdit.js" data-th-src="@{/js/app/admin/cms/banner/bannerEdit.js}"></script>
</body>
</html>